package cn.demoncat.util.lang.entity.report;

import com.baomidou.mybatisplus.annotation.TableField;

import java.util.Objects;

/**
 * 日期统计
 * 
 * @author 延晓磊
 *
 * @since 2017年9月12日
 */
public class DateCountSum extends CountSum implements DateEntity{

	// 日期
	@TableField(exist = false)
	protected String date;

	public DateCountSum() {
		super();
	}

	public DateCountSum(String date, long count, String sum) {
		super();
		this.date = date;
		this.count = count;
		this.sum = sum;
	}

	public DateCountSum(String date, long count) {
		super();
		this.date = date;
		this.count = count;
	}

	public DateCountSum(String date, String sum) {
		super();
		this.date = date;
		this.sum = sum;
	}

	public String getDate() {
		return date;
	}

	public void setDate(String date) {
		this.date = date;
	}

	@Override
	public boolean equals(Object o) {
		if (this == o) return true;
		if (o == null || getClass() != o.getClass()) return false;
		if (!super.equals(o)) return false;
		DateCountSum that = (DateCountSum) o;
		return Objects.equals(date, that.date);
	}

	@Override
	public int hashCode() {
		return Objects.hash(super.hashCode(), date);
	}

	@Override
	public String toString() {
		return "DateCountSum{" +
				"date='" + date + '\'' +
				", count=" + count +
				", sum='" + sum + '\'' +
				'}';
	}
}
